package test;

import java.util.Scanner;

public class Homework1 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();
        char[] arr = str.toCharArray();
        int flag = 0;
        if (arr[0]>=65&&arr[0]<=90){
            for(char c:arr){
                if (c>=65&&c<=90){
                    System.out.println(c);
                    flag++;
                }
            }
            System.out.println(flag);
        }else {
            System.out.println("第一个字母不是大写");
        }
    }
}
